import { ref} from 'vue'
import seachIcon from '@/assets/images/icon/my-account/search-icon.png';
export const useIndex=() => {
    const formInputMap = ref({
      name: '',
      num: '',
      time: ''
    })
    const searchValue = ref('')
    const typeMode = ref('form')
    const typeModeMap = ref({
      form: {
        title: '您来自哪里？',
        titleInfo: '选择您的原国籍，我们将在后续核实您的身份，验证账号方便如金'
      },
      name: {
        title: '您的姓名',
        titleInfo: '请输入您在身份证上的全名，验证账号方便入金'
      },
      proofOfIdentity: {
        title: '身份证明',
        titleInfo: '选择一种验证方式，后续将要求您提供相关照片进行验证。'
      },
      last: {
        title: '身份证明',
        titleInfo: '重新上传或点击”下一步”进行验证。'
      },
    }) as any
    const footerBtns = (type:any) => {
      const typeMap = {
        form: 'name',
        name: 'proofOfIdentity',
        proofOfIdentity: 'last'
      } as any;
    
      if (typeMap[type]) {
        typeMode.value = typeMap[type];
      }
    }
    return {
        seachIcon,
        formInputMap,
        searchValue,
        typeMode,
        typeModeMap,
        footerBtns
    }
}